package Data_Structure.DataType;

import Data_IO.data_json.Json_CreditCardAccount;
import Data_IO.data_json.Json_TargetFlight;
import Data_IO.data_json.Json_Traveller;
import Data_Structure.DataImplement.*;

import java.io.IOException;
import java.util.Date;
import java.util.HashMap;

import static Data_IO.data_transformation.JsonArray2file.json2file;
import static Data_Structure.DataImplement.SeatClassAndPrice.Boeing737SeatClass;
import static Data_Structure.DataImplement.SeatClassAndPrice.Boeing737SeatClassAPrice;

public class CODE_EG {
    public static void main(String[] args) throws IOException {

        //Example for the myFlight

//        HashMap<MealAndPrice.Meals,Integer> meal = new HashMap<>();
//        meal.put(MealAndPrice.Meals.ComboA,MealAndPrice.comboAPrice);
//
//        HashMap<MealAndPrice.Meals,Integer> mealPrice = new HashMap<>();
//        mealPrice.put(MealAndPrice.Meals.ComboA,MealAndPrice.comboAPrice);
//
//        MyFlight myFlight = new MyFlight();
//        myFlight.setMyCarryOnBaggage(10);
//        myFlight.setMyCheckInBaggage(10);
//        myFlight.setMyTakeOffTime(new Date());
//        myFlight.setMyLandingTime(new Date());
//        myFlight.setMyBoardingTime(new Date());
//        myFlight.setMyStartPoint("beijing");
//        myFlight.setMyDestPoint("shanghai");
//        myFlight.setMyFlightID("111111");
//        myFlight.setMyGate("east");
//        myFlight.setMyPlaneType(Flight.PlaneType.Boeing737);
//        myFlight.setFlightStatus(FlightStatus.FlightStatusFs.Boarding);
//        myFlight.setMySeatClass(Boeing737SeatClass[0]);
//        myFlight.setMySeatPosition("A1");
//        myFlight.setMySeatPrice(Boeing737SeatClassAPrice);
//        myFlight.setMyBookingNumber("222222");
//        myFlight.setMeals(meal);
//        myFlight.setMealPrice(mealPrice);
//
//        //Example for the traveller
//        Traveller traveller = new Traveller();
//
//        HashMap<String,MyFlight> flight = new HashMap<>();
//        flight.put("flight1",myFlight);
//        traveller.setFlight(flight);
//
//        traveller.setPersonID("11010520010201");
//        traveller.setSurname("san");
//        traveller.setFirstname("zhang");
//        traveller.setFullName("zhang san");
//        traveller.setGender(Gender.GenderE.MAN);
//
//        Json_Traveller json_traveller = new Json_Traveller();
//        json_traveller.addJson(traveller);
//        json2file(json_traveller.getJsonarray(),"./data/traveller.json");


//        Example for TargetFlight
//        TargetFlight targetFlight = new TargetFlight(new Date(120,4,9),new Date(),new Date(),"shenyang","beijing","200837","G12", Flight.PlaneType.Boeing737, FlightStatus.FlightStatusFs.Boarding);
//        targetFlight.addTargetSeatAndPrice(targetFlight.getTargetMealAndPrice(), MealAndPrice.Meals.ComboA,122);
//
//        Json_TargetFlight json_targetFlight = new Json_TargetFlight();
//        json_targetFlight.addJson(targetFlight);
//        json2file(json_targetFlight.getJsonarray(),"./data/targetFlight.json");

        //Example for CreditCardAccount
//        CreditCardAccount creditCardAccount = new CreditCardAccount();
//        creditCardAccount.setName("Doggy");
//        creditCardAccount.setPersonID("11010520010201");
//        creditCardAccount.setCardID("333333");
//        creditCardAccount.setBalance(0.0);
//        Json_CreditCardAccount json_creditCardAccount = new Json_CreditCardAccount();
//        json_creditCardAccount.addJson(creditCardAccount);
//        json2file(json_creditCardAccount.getJsonarray(),"./data/creditCardAccount.json");


    }
}
